Help > Reference > Macros > Collections > Documents collection

Documents collection

This collection contains Document objects that represent documents in the search results. Use one of the "Fetch..." methods of the Tab object to access this collection.

The example below enumerates all the documents in the search results and outputs their filenames to file "c:\output.txt".

Example

Set FSO = CreateObject("Scripting.FileSystemObject")
Set Output = FSO.CreateTextFile("c:\output.txt", True)
For Each Document in App.ActiveTab.FetchAll
  Output.WriteLine Document.AbsoluteFilename
Next

See Also

Macro Object Model

Collections

Tab.FetchAll

Tab.FetchPrompt

Tab.FetchSelected

Tab.FetchFlagged

Document